package cn.fay.chapter03;

public class Dog {

	String name;
	String says;
	public static void main(String[] args) {
		Dog spot=new Dog();
		spot.name="spot";
		spot.says="Ruff!";
		Dog scruffy=new Dog();
		scruffy.name="scruffy";
		scruffy.says="Wurf!";
		System.out.println(spot.name+":"+spot.says);
		System.out.println(scruffy.name+":"+scruffy.says);
		Dog jefu=spot;
		System.out.println(jefu==spot);
		System.out.println(jefu.equals(spot));
		System.out.println(jefu==scruffy);
		System.out.println(jefu.equals(scruffy));
		
	}

}
